/**
 * @file element.h
 * @author shanyoumu (22035028@zju.edu.cn)
 * @brief 
 * @version 0.1
 * @date 2021-03-09
 * 
 * @copyright Copyright (c) 2021
 * 
 */
#ifndef _shanyoumu_element_point_1D

#include <iostream>
/**
 * @brief 一维度的点
 * 
 */
class Point_1
{
    
    private:
        double *coord; //点的各个分量的值
        int index; //点的编号
    public:
        Point_1();
        Point_1(double _x);
        Point_1(double _x, int _index);
        ~Point_1();
        int get_index() const;
        int set_index(int _i);
        const Point_1& operator=(const Point_1 &_p);
    friend std::ostream& operator<<(std::ostream &_os, const Point_1 &_p);
    friend Point_1 operator +(const Point_1 &_p1, const Point_1 &_p2);
    friend Point_1 operator -(const Point_1 &_p1, const Point_1 &_p2);
};
std::ostream& operator<<(std::ostream &_os, const Point_1 &_p);
Point_1 operator +(const Point_1 &_p1, const Point_1 &_p2);
Point_1 operator -(const Point_1 &_p1, const Point_1 &_p2);
#else
//do nothing
#endif